#pragma once
#include "../Util/Singleton.h"
#include "InputConfiguration.h"
#include <string>
#include <iostream>
#include <tinystr.h>
#include <tinyxml.h>
#include "InputConfiguration.h"
#include "../Graphic/GraphicManager.h"
#include "Level.h"
#include "../Input/InputManager.h"
#include <GL/glut.h>


class cGame : public cSingleton<cGame>
{
  friend class cSingleton<cGame>;
  private:
    //Attribute to hold if the game is finished
    bool mbFinished;
    
  protected:
    cGame() {;}
  public:
    //Initializate game
    bool Init();

    //Update game status
    void Update( float lfTimeStep );

    //Render actual frame
    void Render();

    //Load resources from a XML file 
    void LoadResources();

    //Deinitializate game
    bool Deinit();
    
    //Is the game finished?
    inline bool HasFinished() { return mbFinished; }

    //Finish the game
    inline void Finish() { mbFinished = true; }
};
